import { ModelBase } from "@models/model.base";

enum ProductType {
  Bond,
  Swap,
  Future,
  Currency,
  Enquity,
  Index,
  Fund,
  Repo,
  Option,
}

class ProductModel extends ModelBase {
  productId: string;
  name: string;
  type: ProductType;
  couponRate: number;
  term: number;
  remainingYears: number;

  constructor(
    id: string,
    productId: string,
    name: string,
    type: ProductType,
    couponRate: number,
    term: number,
    remainingYears: number
  ) {
    super(id);

    this.productId = productId;
    this.name = name;
    this.type = type;
    this.couponRate = couponRate;
    this.term = term;
    this.remainingYears = remainingYears;
  }
}

export { ProductType, ProductModel };
